//
//  GJPhotoView.m
//  YDGJ
//
//  Created by 黄卫 on 17/2/24.
//  Copyright © 2017年 huangwei. All rights reserved.
//

#import "GJPhotoView.h"
@implementation GJPhotoView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        self.clipsToBounds = YES;
        self.userInteractionEnabled  = YES;
        self.contentMode = UIViewContentModeScaleAspectFill;
    }
    return self;
}

-(instancetype)initWithSoureFrame:(NSValue *)soureFrame AdUrl:(NSString *)photoUrl AdPhotoData:(NSData *)phtoData
{
    if (self = [super init])
    {
        self.soureFrame = soureFrame;
        self.photoUrl = photoUrl;
        self.photoData = phtoData;
        self.clipsToBounds = YES;
        self.userInteractionEnabled  = YES;
        self.contentMode = UIViewContentModeScaleAspectFill;
    }
    return self;
}
+(instancetype)gjPhotoViewWith:(NSValue *)soureFrame AdUrl:(NSString *)photoUrl AdPhotoData:(NSData *)phtoData
{
    return [[self alloc]initWithSoureFrame:soureFrame AdUrl:photoUrl AdPhotoData:phtoData];
}



@end
